package com.gxa.service.employee;

import com.gxa.common.R.ResponseData;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletResponse;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.text.ParseException;

/**
 * Excel文件上传、下载service层
 */
public interface ExcelService {
    /**
     * Excel文件读取批量导入员工信息
     * @param file        Excel文件流
     * @param deptId      部门ID
     * @return            responseData返回类类型
     */
    ResponseData excelRead(MultipartFile file, String deptId) throws IOException, ParseException;


    /**
     * 通过部门ID导出员工信息
     * @param response    HTTP响应
     * @param deptId      部门ID
     * @return            responseData返回类类型
     * @throws IOException
     */
    ResponseData excelWrite(HttpServletResponse response,String deptId) throws IOException;
}
